﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WorkSummary.Business;

namespace WorkSummaryReoprter
{
    public class BasePage : System.Web.UI.Page
    {
        public BasePage()
        {
        }

        protected override void OnInit(EventArgs e)
        {
            this.Load += new EventHandler(PageBase_Load);
            this.Error += new EventHandler(PageBase_Error);
            this.PreRender += new EventHandler(PageBase_PreRender);

            base.OnInit(e);
        }
        private void PageBase_Load(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(SysVisitor.Instance.AccountNum))
                {
                    Response.Redirect("./Index.html");
                }
            }
            catch (NullReferenceException)
            {
                Response.Redirect("./Index.html");
            }
        }
        private void PageBase_Error(object sender, EventArgs e)
        {
        }
        private void PageBase_PreRender(object sender, EventArgs e)
        {
        }
    }
}